package cn.com.gainfo.bktas.dao;

import java.util.List;

import javax.sql.DataSource;

import cn.com.gainfo.bktas.vo.FeerateVO;
import cn.yzyue.base.dao.AbstractDAO;
import cn.yzyue.base.tools.db.DB;
import cn.yzyue.base.tools.db.SQL;
import cn.yzyue.base.vo.VO;

public class FeerateDAO extends AbstractDAO {

	//"typeid","transtype","areacode","startamt","endamt","feemode","minfee","maxfee","fee","effdate","discount"
	@Override
	public boolean add(DataSource dataSource, VO vo) {
		// TODO Auto-generated method stub
		FeerateVO feerate = (FeerateVO)vo;
		String sql = "insert into feerate (typeid,transtype,areacode,startamt,endamt,feemode,minfee,maxfee,fee,effdate,discount) values('";
		sql += feerate.getTypeid() + "','" + feerate.getTranstype() + "','" + feerate.getAreacode() + "','" + feerate.getStartamt() + "','";
		sql += feerate.getEndamt() + "','" + feerate.getFeemode() + "','" + feerate.getMinfee() + "','" + feerate.getMaxfee() + "','";
		sql += feerate.getFee() + "','" + feerate.getEffdate() + "','" + feerate.getDiscount() + "')";
		return DB.alter(dataSource, sql);
	}

	@Override
	public boolean batchDel(DataSource dataSource, VO vo, List data) {
		// TODO Auto-generated method stub
		return super.batchDel(dataSource, vo, data);
	}

	@Override
	public boolean del(DataSource dataSource, VO vo, String[] ids) {
		// TODO Auto-generated method stub
		return super.del(dataSource, vo, ids);
	}

	@Override
	public List find(DataSource dataSource, SQL sql, int page) {
		// TODO Auto-generated method stub
		return super.find(dataSource, sql, page);
	}

	@Override
	public List find(DataSource dataSource, String sql) {
		// TODO Auto-generated method stub
		return super.find(dataSource, sql);
	}

	@Override
	public List find(DataSource dataSource, VO vo, int page) {
		// TODO Auto-generated method stub
		return super.find(dataSource, vo, page);
	}

	@Override
	public VO findByIds(DataSource dataSource, VO vo, String[] ids) {
		// TODO Auto-generated method stub
		return super.findByIds(dataSource, vo, ids);
	}

	@Override
	public boolean mod(DataSource dataSource, VO vo) {
		// TODO Auto-generated method stub
		return super.mod(dataSource, vo);
	}

}
